package com.me.jingdongshop.ui.adapter;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.me.jingdongshop.R;

/**
 * Created by Administrator on 2017/5/7.
 * 测试我的订单详情页的  item
 */

public class TestMyIndentItemAdapter extends BaseAdapter {

    @Override
    public int getCount() {
        return 20;
    }
    class  MyViewHolder{
        TextView tvSettop;
        TextView tvDelete;
        TextView tvIndentId;
        TextView tvIndentMoney;
        TextView tvIndentStatus;
        TextView tvIndentTime;


    }
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        MyViewHolder  hd=null;
        if (convertView==null){
                hd = new MyViewHolder();
            convertView = View.inflate(parent.getContext(),R.layout.my_indent_item,null);
            hd.tvSettop = (TextView) convertView.findViewById(R.id.tv_settop);
            hd.tvDelete = (TextView) convertView.findViewById(R.id.tv_delete);
            hd.tvIndentId = (TextView) convertView.findViewById(R.id.tv_indent_id);
            hd.tvIndentMoney = (TextView) convertView.findViewById(R.id.tv_indent_money);
            hd.tvIndentStatus = (TextView) convertView.findViewById(R.id.tv_indent_status);
            hd.tvIndentTime = (TextView) convertView.findViewById(R.id.tv_indent_time);
            convertView.setTag(hd);
        }else{
            hd= (MyViewHolder) convertView.getTag();

        }
        hd.tvIndentId.setText("订单编号：20170507");
        hd.tvIndentMoney.setText("订单总额：￥66.6");
        hd.tvIndentStatus.setText("状态：确定，没错！我很确定");
        hd.tvIndentTime.setText("2017/05/07 10:13:33");

        return convertView;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }


}
